﻿using System;
using System.Windows.Forms;
using RazakiBLL;

namespace RazakiCipher
{
    public partial class Cipher : Form
    {
        private const string KEY = "916B9D0A7CE845F0B88234D7B530117A";

        public Cipher()
        {
            InitializeComponent();
        }

        private void BtnDo_Click(object sender, EventArgs e)
        {
            string input = TxtInput.Text;
            string result;

            if (RadEncrypt.Checked)
                result = Encryption.Encrypt(input, KEY);
            else
                result = Encryption.Decrypt(input, KEY);

            TxtResult.Text = result;
        }
    }
}
